package Mooc.Chap1;

import java.util.Scanner;

public class _03函数 {
    public static boolean isPrime(int num) {
        boolean isPrime = true;
        for (int i = 2; i < num; i++) {
            if (num % i == 0) {
                isPrime = false;
                break;
            }
        }
        return isPrime;
    }
    public static void sum(int a,int b){
        int i;
        int sum=0;
        for(i=a;i<=b;i++){
            sum+=i;
        }
        System.out.println(sum);
    }

    public static void main(String[] args) {
//        System.out.println("Hello World!");
//        sum(10,50);
        /*
        for(int i=2;i<50;i++){
            if (isPrime(i)) {
                System.out.print(i+" ");
            }
        }

         */
        Scanner sc = new Scanner(System.in);

    }
}



